<div class="aw-top-menu-wrap">

    <div class="container">
        <!-- logo -->
        <div class="aw-logo hidden-xs">
            <a href="{:es_url('Index/index')}" id="logo">
                <img src="__PUBLIC_IMG__/logoblack.png"/>
            </a>
        </div>
        <!-- end logo -->
        <!-- 搜索框 -->
        <div class="aw-search-box ">
            <form class="navbar-search" action="{:es_url('search/index')}" id="global_search_form" method="post">
                <input class="form-control search-query" type="text" placeholder="搜索问题、话题或人" autocomplete="off" name="q"
                       id="aw-search-query">
                <span title="搜索" id="global_search_btns" onclick="$('#global_search_form').submit();"><i
                        class="iconfont icon-chazhao"></i></span>
                <div class="aw-dropdown">
                    <div class="mod-body">
                        <p class="title">输入关键字进行搜索</p>
                        <ul class="aw-dropdown-list hide"></ul>
                        <p class="search"><span>搜索:</span><a onclick="$('#global_search_form').submit();"></a></p>
                    </div>

                </div>
            </form>
            <a href="javascript:search(0);" class="search-close">关闭</a>
        </div>
        <script type="text/javascript">
            function search(s) {

                if (s == 1) {
                    var height = $('.aw-top-nav').height() - 15;

                    $('#xiaosou').fadeOut();
                    $('.aw-search-box').show().animate({top: height}, 300);
                } else {
                    $('#xiaosou').fadeIn();
                    $('.aw-search-box').stop().fadeOut();
                }
            }
        </script>
        <!-- end 搜索框 -->
        <!-- 导航 -->
        <div class="aw-top-nav navbar">
            <div class="navbar-header">
                <button class="navbar-toggle pull-left">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <nav role="navigation" class="collapse navbar-collapse bs-navbar-collapse">
                <ul class="nav navbar-nav">

                    {volist name="nav" id="vo"}
                    {eq name="vo.pid" value="1"}
                    <li>
                        <a href="{$vo.link|getnavlink=$vo.sid}" target="{$vo.target}" title="{$vo.alias}" {if
                           condition="true eq getnavactive(getnavlink($vo['link'],$vo['sid']))" }class="active" {/if}><i
                            class="iconfont icon-{$vo.icon}"></i> {$vo.name}</a>
                    </li>
                    {/eq}
                    {/volist}
                    {if condition="session('member_info')"}
                    <li>
                        <a href="{:es_url('user/mess')}" class=""><i class="iconfont icon-remind1"></i> 通知</a>
                        {if condition="$messcount gt 0"}
                        <span class="badge badge-important" id="notifications_unread">{$messcount}</span>
                        {/if}
                        <div class="aw-dropdown pull-right hidden-xs">
                            <div class="mod-body">
                                <ul id="header_notification_list">

                                    {if condition="$messlist"}

                                    {volist name="messlist" id="vo"}
                                    <li>
                                        <h3 class="title">
                                            <i class="iconfont icon-remind"></i> {$vo['messname']}&nbsp;&nbsp;<span
                                                class="time">{$vo.update_time|friendlyDate}</span>


                                        </h3>

                                        <p class="msg-body">{$vo.content}
                                        </p>

                                    </li>

                                    {/volist}


                                    {else/}

                                    <p class="aw-padding10" align="center">没有未读通知</p>
                                    {/if}


                                </ul>
                            </div>
                            <div class="mod-footer">
                                <a href="{:es_url('user/mess')}">查看全部</a>
                            </div>
                        </div>
                    </li>
                    {/if}


                </ul>
            </nav>
        </div>
        <!-- end 导航 -->
        <!-- 用户栏 -->

        {if condition="session('member_info')"}
        <div class="aw-user-nav">

            <a href="javascript:;" class="aw-user-nav-dropdown">
                <img alt="{$userinfo.nickname}" src="{$userinfo.userhead|getheadurl}">

            </a>
            <div class="aw-dropdown dropdown-list pull-right">
                <ul class="aw-dropdown-list">
                    {if condition="$userinfo['is_inside'] eq 1"}
                    <li class=""><a href="{:webconfig('web_url')}admin.php" target="_blank"> 管理后台</a></li>
                    {/if}
                    <li class=""><a href="{:es_url('user/home',array('id'=>$userinfo['id']))}"><i
                            class="iconfont icon-fenlei"></i> 主页</a></li>
                    <li class=""><a href="{:es_url('user/mess')}"><i class="iconfont icon-remind"></i> 消息</a></li>
                    <li class=""><a href="{:es_url('user/mytopic')}"><i class="iconfont icon-pinglun"></i> 我的帖子</a></li>
                    <li><a href="{:es_url('user/index')}"><i class="iconfont icon-shezhi"></i> 设置</a></li>
                    <li><a href="javascript:;" data-url="{:es_url('user/logout')}" class="logoutajax" target="_blank"><i
                            class="iconfont icon-close"></i> 退出</a></li>
                </ul>
            </div>

        </div>
        <div class="aw-publish-btn">
            <a id="header_publish" href="{:es_url('topic/topicadd')}" class="btn-primary">
                <i class="iconfont icon-fabu2"></i>发布</a>

        </div>
        {else/}
        <div class="aw-user-nav">

            <a class="btn-primary btnst " href="{:es_url('user/login')}">登录</a>
            <span class="or">or</span>
            <a class="register btn-success btnst" href="{:es_url('user/register')}">注册</a>
            <!-- end 登陆&注册栏 -->
        </div>


        {/if}


    </div>

    <div class="g-bdc " id="fudao" style="display: block;">
        <div class="g-mn">
            <ul class="m-vw-nav f-cb container">
                <li class="pull-left" id="xiaosou"><a href="javascript:search(1);" class="search"><i
                        class="icon icon-search"></i>&nbsp;搜索</a></li>
                {volist name="topiccatelist" id="vo" offset="0" length="6"}
                <li class=" pull-right xs {if condition=" $cateinfo['id'] eq $vo['id']"}active{/if}">
                <a href="{:es_url('topic/cindex',array('id'=>$vo['id']))}">{$vo.name}</a>
                </li>
                {/volist}

            </ul>
        </div>
    </div>
</div>